package zust.study.io;

import java.io.*;

/**
 * 字节流
 */
public class Demo02_InputSteam {

    public static void main(String[] args) throws IOException {

        Integer count = 0;
        InputStream inputStream = null;
        int reader = 0;
        byte[] buffer = new byte[512];
        inputStream = new FileInputStream(
                new File("C:/files/Java/IO/demo1.txt"));
        while((reader = inputStream.read(buffer)) != -1) {
            count ++ ;
            System.out.print(reader + ",");
        }
        System.out.println();
        System.out.println("=====is end, and the count is " + count);

        inputStream.close();

    }

}
